#ifndef __GAF_FACE_H__
#define __GAF_FACE_H__


namespace GAF
{
	//class Graphics -* ForEach
		class Face;
}
typedef GAF::Face			GAF_CFace;

#include "GAF_Define.h"
#include "GAF_Bundle.h"
#include "GAF_Graphics.h"
#include "GAF_Image.h"

namespace GAF
{
	/// 界面类
	class _ABSTRACT Face : public Graphics
	{
	private:
		typedef STD_LIST<Graphics*>
					GraphicsList;

	public:
		Face();
		/// 构造函数，带有界面图像
		Face(UINT nWidth, UINT nHeight);
		virtual ~Face();

	public:
		/// 初始化
		bool			Init(Bundle* pbdlParam = NULL);

		/**
		 *  @name 事件成员
		 */
		// 继承事件
// 	public:
// 		virtual bool		OnPreRender(CGraphics* pGraphics);		// 渲染之前
// 		virtual bool		OnRender()					// 渲染时

		// 定义事件
	protected:
		/// 界面初始化时
		virtual bool		OnInit(GAF_CBundle* pbdlParam)			// 界面初始化时
					{return true;}

	public:
 		Pointer			Foreach(bool isFirst);

 		UINT			GetCount();
		/// 添加绘制对象
		void			AddGraphics(Graphics* pGraphics, bool isBack = false);
		/// 添加绘制对象数组
		void			AddGraphicses(Graphics** pGraphics, COUNT nCount, bool isBack = false);
		/// 移除绘制对象
		void			RemoveGraphics(Graphics* pGraphics);
		/// 清除绘制对象
		void			ClearGraphics();

	public:
		/// 刷新
		void			RefreshSize();

	protected:
		/// 界面图像
		Image*			m_pimgFace;

	private:
		GraphicsList		m_lstGraphicses;
		GraphicsList::const_iterator
					ms_citCur;
	};
}

#endif
